//
//  MLABaseShadowTableCell.m
//  MagicLampApp
//
//  Created by Zheng on 2018/12/20.
//  Copyright © 2018 zheng.magic.lamp.app. All rights reserved.
//

#import "MLABaseShadowTableCell.h"

@implementation MLABaseShadowTableCell

- (void)awakeFromNib {
    [super awakeFromNib];
    
    self.selectionStyle = UITableViewCellSelectionStyleNone;
    _shadowView = [[UIView alloc] init];
    _shadowView.backgroundColor = [UIColor whiteColor];
    _shadowView.layer.shadowColor = CX_GetColorHex(0x5C9EEB, 0.3).CGColor;
    _shadowView.layer.shadowOffset = CGSizeMake(0, 1);
    _shadowView.layer.shadowOpacity = 1;
    _shadowView.layer.cornerRadius = 5;
    [self.contentView addSubview:_shadowView];
    [_shadowView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.mas_equalTo(15);
        make.right.mas_equalTo(-15);
        make.top.mas_equalTo(5);
        make.bottom.mas_equalTo(-5);
    }];

}

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        self.selectionStyle = UITableViewCellSelectionStyleNone;
        _shadowView = [[UIView alloc] init];
        _shadowView.backgroundColor = [UIColor whiteColor];
        _shadowView.layer.shadowColor = CX_GetColorHex(0x5C9EEB, 0.3).CGColor;
        _shadowView.layer.shadowOffset = CGSizeMake(0, 1);
        _shadowView.layer.shadowOpacity = 1;
        _shadowView.layer.cornerRadius = 5;
        [self.contentView addSubview:_shadowView];
        [_shadowView mas_makeConstraints:^(MASConstraintMaker *make) {
            make.left.mas_equalTo(15);
            make.right.mas_equalTo(-15);
            make.top.mas_equalTo(5);
            make.bottom.mas_equalTo(-5);
        }];

    }
    return self;
}


@end
